package s.k.gui.webtest.unittest;

import java.io.File;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;

public class PaoPageBaseTest {
	static FirefoxProfile profile = new FirefoxProfile(new File(
			"E:\\Program Files\\Mozilla Firefox\\"));
	static WebDriver driver = new FirefoxDriver(profile);
	@BeforeMethod
	public void init() throws InterruptedException {
		System.out.println("---------------测试开始---------------");
		driver.get("http://gpu.pcpop.com/");
		Thread.sleep(7000);
	}
	@AfterMethod
	public void destory() throws InterruptedException {
		System.out.println("---------------测试结束----------------");
		for (int i = 5; i >= 1; i--) {
			Thread.sleep(1000);
			System.out.println("还有 " + i + " 秒就要关闭浏览器了");
		}
		driver.quit();
		System.out.println("---------------浏览器已经关闭了--------------");
	}
}
